package com.jadows.tdog.server.option;

import com.jadows.tdog.server.listener.ChannelEventListener;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;


/**
 * @author taojiacheng
 */
@ToString
@Accessors(fluent = true)
@Data
public class ChatServerOption {

    private ServerOption serverOption = null;
    private int parentGroupThread = Runtime.getRuntime().availableProcessors() * 2;
    private int workerGroupThread = Runtime.getRuntime().availableProcessors() * 2;
    private int publicExecutorThread = Runtime.getRuntime().availableProcessors() * 2;
    /**
     * 读空闲时长
     */
    private int readerIdleTimeSeconds = 30;
    // 记录耗时请求
    private boolean performance = false;
    private long performanceCostTime = 200;
    private int maxFrameLength = 1024 * 1024 * 10;

    /**
     * 通道事件处理器
     */
    private ChannelEventListener listener = null;

}
